﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Xml.Serialization;

namespace IDT.Entity
{
    public class Category
    {
        [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        [Column(Order = 0)]
        public Guid CategoryKey { get; set; }

        [Column(Order = 1)]
        public int CategoryId { get; set; }

        [Column(Order = 2)]
        public string Name { get; set; }

        [Column(Order = 3)]
        public string Url { get; set; }

        [Column(Order = 4)]
        public bool IsActive { get; set; }

        [XmlArray("Albums")]
        [XmlArrayItem("Album")]
        public virtual List<Album> Albums { get; set; } = new List<Album>();
    }
}